package org.liaohailong.library.db.builder

/**
 * Author: liaohailong
 * Date: 2019/4/4
 * Time: 11:44 AM
 * Description:SQLExecutor实例化工厂
 **/
object SQLHelperFactory {
    private val threadLocal = object : ThreadLocal<SQLHelper>() {
        override fun initialValue(): SQLHelper? {
            return SQLHelperImpl()
        }
    }

    fun get(): SQLHelper {
        val obj = threadLocal.get()
        obj!!.reset()
        return obj
    }
}